package cn.lyjuan.android.demofive.ui.cut_animation;

import android.app.Activity;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by chad on 2016/6/17.
 */
public class SecondActivity extends Activity
{
    public static final String INTENT_KEY_NAME = "NAME";

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        String name = this.getIntent().getStringExtra(INTENT_KEY_NAME);

        TextView text = new TextView(this);
        ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        text.setLayoutParams(lp);
        text.setGravity(Gravity.CENTER);
        text.setTextSize(TypedValue.COMPLEX_UNIT_SP, 36);
        text.setText(name);

        this.setContentView(text);
    }
}
